package com.wlz;

/**
 * 继承Thread类，重写run方法
 * @@author wlz
 */
public class ThreadThread extends Thread {

    private String name;

    public ThreadThread(String name) {

        this.name = name;
    }

    @Override
    public void run() {
        System.out.println(name + "好");
    }

    public static void main(String[] args) {
//       new Thread01("老师").run(); //方法级别的调用
        new ThreadThread("老师").start();
    }

}
